#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main()
{
    string s;
    cin >> s;
    int i = 0, j = s.size() - 1;
    while (i < j)
    {
        if (s[i] == s[j])
        {
            i++, j--;
            continue;
        }
        else
        {
            s.insert(s.end() - i, s[i]);
            i = 0, j = s.size() - 1;
        }
    }
    cout << s;
}